3.204 \(\int \tan ^6(e+f x) (a+b \tan ^2(e+f x))^2 \, dx\)

Optimal. Leaf size=113 \[ \frac{b (2 a-b) \tan ^7(e+f x)}{7 f}+\frac{(a-b)^2 \tan ^5(e+f x)}{5 f}-\frac{(a-b)^2 \tan ^3(e+f x)}{3 f}+\frac{(a-b)^2 \tan (e+f x)}{f}-x (a-b)^2+\frac{b^2 \tan ^9(e+f x)}{9 f} \]

[Out]

-((a - b)^2*x) + ((a - b)^2*Tan[e + f*x])/f - ((a - b)^2*Tan[e + f*x]^3)/(3*f) + ((a - b)^2*Tan[e + f*x]^5)/(5
*f) + ((2*a - b)*b*Tan[e + f*x]^7)/(7*f) + (b^2*Tan[e + f*x]^9)/(9*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0881873, antiderivative size = 113, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {3670, 461, 203} \[ \frac{b (2 a-b) \tan ^7(e+f x)}{7 f}+\frac{(a-b)^2 \tan ^5(e+f x)}{5 f}-\frac{(a-b)^2 \tan ^3(e+f x)}{3 f}+\frac{(a-b)^2 \tan (e+f x)}{f}-x (a-b)^2+\frac{b^2 \tan ^9(e+f x)}{9 f} \]

Antiderivative was successfully verified.

[In]

Int[Tan[e + f*x]^6*(a + b*Tan[e + f*x]^2)^2,x]

[Out]

-((a - b)^2*x) + ((a - b)^2*Tan[e + f*x])/f - ((a - b)^2*Tan[e + f*x]^3)/(3*f) + ((a - b)^2*Tan[e + f*x]^5)/(5
*f) + ((2*a - b)*b*Tan[e + f*x]^7)/(7*f) + (b^2*Tan[e + f*x]^9)/(9*f)

Rule 3670

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(c*ff)/f, Subst[Int[(((d*ff*x)/c)^m*(a + b*(ff*x)^n)^p)/(c^
2 + ff^2*x^2), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rule 461

Int[(((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_))/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Int[ExpandIntegr
and[((e*x)^m*(a + b*x^n)^p)/(c + d*x^n), x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[n
, 0] && IGtQ[p, 0] && (IntegerQ[m] || IGtQ[2*(m + 1), 0] ||  !RationalQ[m])

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^6 \left (a+b x^2\right )^2}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \left ((a-b)^2-(a-b)^2 x^2+(a-b)^2 x^4+(2 a-b) b x^6+b^2 x^8+\frac{-a^2+2 a b-b^2}{1+x^2}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{(a-b)^2 \tan (e+f x)}{f}-\frac{(a-b)^2 \tan ^3(e+f x)}{3 f}+\frac{(a-b)^2 \tan ^5(e+f x)}{5 f}+\frac{(2 a-b) b \tan ^7(e+f x)}{7 f}+\frac{b^2 \tan ^9(e+f x)}{9 f}-\frac{(a-b)^2 \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-(a-b)^2 x+\frac{(a-b)^2 \tan (e+f x)}{f}-\frac{(a-b)^2 \tan ^3(e+f x)}{3 f}+\frac{(a-b)^2 \tan ^5(e+f x)}{5 f}+\frac{(2 a-b) b \tan ^7(e+f x)}{7 f}+\frac{b^2 \tan ^9(e+f x)}{9 f}\\ \end{align*}

Mathematica [B]  time = 0.0832041, size = 243, normalized size = 2.15 \[ \frac{a^2 \tan ^5(e+f x)}{5 f}-\frac{a^2 \tan ^3(e+f x)}{3 f}-\frac{a^2 \tan ^{-1}(\tan (e+f x))}{f}+\frac{a^2 \tan (e+f x)}{f}+\frac{2 a b \tan ^7(e+f x)}{7 f}-\frac{2 a b \tan ^5(e+f x)}{5 f}+\frac{2 a b \tan ^3(e+f x)}{3 f}+\frac{2 a b \tan ^{-1}(\tan (e+f x))}{f}-\frac{2 a b \tan (e+f x)}{f}+\frac{b^2 \tan ^9(e+f x)}{9 f}-\frac{b^2 \tan ^7(e+f x)}{7 f}+\frac{b^2 \tan ^5(e+f x)}{5 f}-\frac{b^2 \tan ^3(e+f x)}{3 f}-\frac{b^2 \tan ^{-1}(\tan (e+f x))}{f}+\frac{b^2 \tan (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[e + f*x]^6*(a + b*Tan[e + f*x]^2)^2,x]

[Out]

-((a^2*ArcTan[Tan[e + f*x]])/f) + (2*a*b*ArcTan[Tan[e + f*x]])/f - (b^2*ArcTan[Tan[e + f*x]])/f + (a^2*Tan[e +
 f*x])/f - (2*a*b*Tan[e + f*x])/f + (b^2*Tan[e + f*x])/f - (a^2*Tan[e + f*x]^3)/(3*f) + (2*a*b*Tan[e + f*x]^3)
/(3*f) - (b^2*Tan[e + f*x]^3)/(3*f) + (a^2*Tan[e + f*x]^5)/(5*f) - (2*a*b*Tan[e + f*x]^5)/(5*f) + (b^2*Tan[e +
 f*x]^5)/(5*f) + (2*a*b*Tan[e + f*x]^7)/(7*f) - (b^2*Tan[e + f*x]^7)/(7*f) + (b^2*Tan[e + f*x]^9)/(9*f)

________________________________________________________________________________________

Maple [B]  time = 0.004, size = 226, normalized size = 2. \begin{align*}{\frac{{b}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{9}}{9\,f}}+{\frac{2\,ab \left ( \tan \left ( fx+e \right ) \right ) ^{7}}{7\,f}}-{\frac{{b}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{7}}{7\,f}}+{\frac{{a}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{5}}{5\,f}}-{\frac{2\, \left ( \tan \left ( fx+e \right ) \right ) ^{5}ab}{5\,f}}+{\frac{{b}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{5}}{5\,f}}-{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{3}{a}^{2}}{3\,f}}+{\frac{2\, \left ( \tan \left ( fx+e \right ) \right ) ^{3}ab}{3\,f}}-{\frac{{b}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{3\,f}}+{\frac{{a}^{2}\tan \left ( fx+e \right ) }{f}}-2\,{\frac{\tan \left ( fx+e \right ) ab}{f}}+{\frac{{b}^{2}\tan \left ( fx+e \right ) }{f}}-{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ){a}^{2}}{f}}+2\,{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ) ab}{f}}-{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ){b}^{2}}{f}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(f*x+e)^6*(a+b*tan(f*x+e)^2)^2,x)

[Out]

1/9*b^2*tan(f*x+e)^9/f+2/7/f*a*b*tan(f*x+e)^7-1/7*b^2*tan(f*x+e)^7/f+1/5/f*a^2*tan(f*x+e)^5-2/5/f*tan(f*x+e)^5
*a*b+1/5*b^2*tan(f*x+e)^5/f-1/3/f*tan(f*x+e)^3*a^2+2/3/f*tan(f*x+e)^3*a*b-1/3*b^2*tan(f*x+e)^3/f+1/f*a^2*tan(f
*x+e)-2*a*b*tan(f*x+e)/f+b^2*tan(f*x+e)/f-1/f*arctan(tan(f*x+e))*a^2+2/f*arctan(tan(f*x+e))*a*b-1/f*arctan(tan
(f*x+e))*b^2

________________________________________________________________________________________

Maxima [A]  time = 1.60621, size = 159, normalized size = 1.41 \begin{align*} \frac{35 \, b^{2} \tan \left (f x + e\right )^{9} + 45 \,{\left (2 \, a b - b^{2}\right )} \tan \left (f x + e\right )^{7} + 63 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{5} - 105 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{3} - 315 \,{\left (a^{2} - 2 \, a b + b^{2}\right )}{\left (f x + e\right )} + 315 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )}{315 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^6*(a+b*tan(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

1/315*(35*b^2*tan(f*x + e)^9 + 45*(2*a*b - b^2)*tan(f*x + e)^7 + 63*(a^2 - 2*a*b + b^2)*tan(f*x + e)^5 - 105*(
a^2 - 2*a*b + b^2)*tan(f*x + e)^3 - 315*(a^2 - 2*a*b + b^2)*(f*x + e) + 315*(a^2 - 2*a*b + b^2)*tan(f*x + e))/
f

________________________________________________________________________________________

Fricas [A]  time = 1.12553, size = 293, normalized size = 2.59 \begin{align*} \frac{35 \, b^{2} \tan \left (f x + e\right )^{9} + 45 \,{\left (2 \, a b - b^{2}\right )} \tan \left (f x + e\right )^{7} + 63 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{5} - 105 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{3} - 315 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} f x + 315 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )}{315 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^6*(a+b*tan(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

1/315*(35*b^2*tan(f*x + e)^9 + 45*(2*a*b - b^2)*tan(f*x + e)^7 + 63*(a^2 - 2*a*b + b^2)*tan(f*x + e)^5 - 105*(
a^2 - 2*a*b + b^2)*tan(f*x + e)^3 - 315*(a^2 - 2*a*b + b^2)*f*x + 315*(a^2 - 2*a*b + b^2)*tan(f*x + e))/f

________________________________________________________________________________________

Sympy [A]  time = 2.39661, size = 212, normalized size = 1.88 \begin{align*} \begin{cases} - a^{2} x + \frac{a^{2} \tan ^{5}{\left (e + f x \right )}}{5 f} - \frac{a^{2} \tan ^{3}{\left (e + f x \right )}}{3 f} + \frac{a^{2} \tan{\left (e + f x \right )}}{f} + 2 a b x + \frac{2 a b \tan ^{7}{\left (e + f x \right )}}{7 f} - \frac{2 a b \tan ^{5}{\left (e + f x \right )}}{5 f} + \frac{2 a b \tan ^{3}{\left (e + f x \right )}}{3 f} - \frac{2 a b \tan{\left (e + f x \right )}}{f} - b^{2} x + \frac{b^{2} \tan ^{9}{\left (e + f x \right )}}{9 f} - \frac{b^{2} \tan ^{7}{\left (e + f x \right )}}{7 f} + \frac{b^{2} \tan ^{5}{\left (e + f x \right )}}{5 f} - \frac{b^{2} \tan ^{3}{\left (e + f x \right )}}{3 f} + \frac{b^{2} \tan{\left (e + f x \right )}}{f} & \text{for}\: f \neq 0 \\x \left (a + b \tan ^{2}{\left (e \right )}\right )^{2} \tan ^{6}{\left (e \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)**6*(a+b*tan(f*x+e)**2)**2,x)

[Out]

Piecewise((-a**2*x + a**2*tan(e + f*x)**5/(5*f) - a**2*tan(e + f*x)**3/(3*f) + a**2*tan(e + f*x)/f + 2*a*b*x +
 2*a*b*tan(e + f*x)**7/(7*f) - 2*a*b*tan(e + f*x)**5/(5*f) + 2*a*b*tan(e + f*x)**3/(3*f) - 2*a*b*tan(e + f*x)/
f - b**2*x + b**2*tan(e + f*x)**9/(9*f) - b**2*tan(e + f*x)**7/(7*f) + b**2*tan(e + f*x)**5/(5*f) - b**2*tan(e
 + f*x)**3/(3*f) + b**2*tan(e + f*x)/f, Ne(f, 0)), (x*(a + b*tan(e)**2)**2*tan(e)**6, True))

________________________________________________________________________________________

Giac [B]  time = 13.3622, size = 3536, normalized size = 31.29 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^6*(a+b*tan(f*x+e)^2)^2,x, algorithm="giac")

[Out]

-1/315*(315*a^2*f*x*tan(f*x)^9*tan(e)^9 - 630*a*b*f*x*tan(f*x)^9*tan(e)^9 + 315*b^2*f*x*tan(f*x)^9*tan(e)^9 -
2835*a^2*f*x*tan(f*x)^8*tan(e)^8 + 5670*a*b*f*x*tan(f*x)^8*tan(e)^8 - 2835*b^2*f*x*tan(f*x)^8*tan(e)^8 + 315*a
^2*tan(f*x)^9*tan(e)^8 - 630*a*b*tan(f*x)^9*tan(e)^8 + 315*b^2*tan(f*x)^9*tan(e)^8 + 315*a^2*tan(f*x)^8*tan(e)
^9 - 630*a*b*tan(f*x)^8*tan(e)^9 + 315*b^2*tan(f*x)^8*tan(e)^9 + 11340*a^2*f*x*tan(f*x)^7*tan(e)^7 - 22680*a*b
*f*x*tan(f*x)^7*tan(e)^7 + 11340*b^2*f*x*tan(f*x)^7*tan(e)^7 - 105*a^2*tan(f*x)^9*tan(e)^6 + 210*a*b*tan(f*x)^
9*tan(e)^6 - 105*b^2*tan(f*x)^9*tan(e)^6 - 2835*a^2*tan(f*x)^8*tan(e)^7 + 5670*a*b*tan(f*x)^8*tan(e)^7 - 2835*
b^2*tan(f*x)^8*tan(e)^7 - 2835*a^2*tan(f*x)^7*tan(e)^8 + 5670*a*b*tan(f*x)^7*tan(e)^8 - 2835*b^2*tan(f*x)^7*ta
n(e)^8 - 105*a^2*tan(f*x)^6*tan(e)^9 + 210*a*b*tan(f*x)^6*tan(e)^9 - 105*b^2*tan(f*x)^6*tan(e)^9 - 26460*a^2*f
*x*tan(f*x)^6*tan(e)^6 + 52920*a*b*f*x*tan(f*x)^6*tan(e)^6 - 26460*b^2*f*x*tan(f*x)^6*tan(e)^6 + 63*a^2*tan(f*
x)^9*tan(e)^4 - 126*a*b*tan(f*x)^9*tan(e)^4 + 63*b^2*tan(f*x)^9*tan(e)^4 + 945*a^2*tan(f*x)^8*tan(e)^5 - 1890*
a*b*tan(f*x)^8*tan(e)^5 + 945*b^2*tan(f*x)^8*tan(e)^5 + 11340*a^2*tan(f*x)^7*tan(e)^6 - 22680*a*b*tan(f*x)^7*t
an(e)^6 + 11340*b^2*tan(f*x)^7*tan(e)^6 + 11340*a^2*tan(f*x)^6*tan(e)^7 - 22680*a*b*tan(f*x)^6*tan(e)^7 + 1134
0*b^2*tan(f*x)^6*tan(e)^7 + 945*a^2*tan(f*x)^5*tan(e)^8 - 1890*a*b*tan(f*x)^5*tan(e)^8 + 945*b^2*tan(f*x)^5*ta
n(e)^8 + 63*a^2*tan(f*x)^4*tan(e)^9 - 126*a*b*tan(f*x)^4*tan(e)^9 + 63*b^2*tan(f*x)^4*tan(e)^9 + 39690*a^2*f*x
*tan(f*x)^5*tan(e)^5 - 79380*a*b*f*x*tan(f*x)^5*tan(e)^5 + 39690*b^2*f*x*tan(f*x)^5*tan(e)^5 + 90*a*b*tan(f*x)
^9*tan(e)^2 - 45*b^2*tan(f*x)^9*tan(e)^2 - 252*a^2*tan(f*x)^8*tan(e)^3 + 1134*a*b*tan(f*x)^8*tan(e)^3 - 567*b^
2*tan(f*x)^8*tan(e)^3 - 2835*a^2*tan(f*x)^7*tan(e)^4 + 7560*a*b*tan(f*x)^7*tan(e)^4 - 3780*b^2*tan(f*x)^7*tan(
e)^4 - 24885*a^2*tan(f*x)^6*tan(e)^5 + 52920*a*b*tan(f*x)^6*tan(e)^5 - 26460*b^2*tan(f*x)^6*tan(e)^5 - 24885*a
^2*tan(f*x)^5*tan(e)^6 + 52920*a*b*tan(f*x)^5*tan(e)^6 - 26460*b^2*tan(f*x)^5*tan(e)^6 - 2835*a^2*tan(f*x)^4*t
an(e)^7 + 7560*a*b*tan(f*x)^4*tan(e)^7 - 3780*b^2*tan(f*x)^4*tan(e)^7 - 252*a^2*tan(f*x)^3*tan(e)^8 + 1134*a*b
*tan(f*x)^3*tan(e)^8 - 567*b^2*tan(f*x)^3*tan(e)^8 + 90*a*b*tan(f*x)^2*tan(e)^9 - 45*b^2*tan(f*x)^2*tan(e)^9 -
 39690*a^2*f*x*tan(f*x)^4*tan(e)^4 + 79380*a*b*f*x*tan(f*x)^4*tan(e)^4 - 39690*b^2*f*x*tan(f*x)^4*tan(e)^4 + 3
5*b^2*tan(f*x)^9 - 180*a*b*tan(f*x)^8*tan(e) + 405*b^2*tan(f*x)^8*tan(e) + 378*a^2*tan(f*x)^7*tan(e)^2 - 2016*
a*b*tan(f*x)^7*tan(e)^2 + 2268*b^2*tan(f*x)^7*tan(e)^2 + 3990*a^2*tan(f*x)^6*tan(e)^3 - 11760*a*b*tan(f*x)^6*t
an(e)^3 + 8820*b^2*tan(f*x)^6*tan(e)^3 + 32130*a^2*tan(f*x)^5*tan(e)^4 - 70560*a*b*tan(f*x)^5*tan(e)^4 + 39690
*b^2*tan(f*x)^5*tan(e)^4 + 32130*a^2*tan(f*x)^4*tan(e)^5 - 70560*a*b*tan(f*x)^4*tan(e)^5 + 39690*b^2*tan(f*x)^
4*tan(e)^5 + 3990*a^2*tan(f*x)^3*tan(e)^6 - 11760*a*b*tan(f*x)^3*tan(e)^6 + 8820*b^2*tan(f*x)^3*tan(e)^6 + 378
*a^2*tan(f*x)^2*tan(e)^7 - 2016*a*b*tan(f*x)^2*tan(e)^7 + 2268*b^2*tan(f*x)^2*tan(e)^7 - 180*a*b*tan(f*x)*tan(
e)^8 + 405*b^2*tan(f*x)*tan(e)^8 + 35*b^2*tan(e)^9 + 26460*a^2*f*x*tan(f*x)^3*tan(e)^3 - 52920*a*b*f*x*tan(f*x
)^3*tan(e)^3 + 26460*b^2*f*x*tan(f*x)^3*tan(e)^3 + 90*a*b*tan(f*x)^7 - 45*b^2*tan(f*x)^7 - 252*a^2*tan(f*x)^6*
tan(e) + 1134*a*b*tan(f*x)^6*tan(e) - 567*b^2*tan(f*x)^6*tan(e) - 2835*a^2*tan(f*x)^5*tan(e)^2 + 7560*a*b*tan(
f*x)^5*tan(e)^2 - 3780*b^2*tan(f*x)^5*tan(e)^2 - 24885*a^2*tan(f*x)^4*tan(e)^3 + 52920*a*b*tan(f*x)^4*tan(e)^3
 - 26460*b^2*tan(f*x)^4*tan(e)^3 - 24885*a^2*tan(f*x)^3*tan(e)^4 + 52920*a*b*tan(f*x)^3*tan(e)^4 - 26460*b^2*t
an(f*x)^3*tan(e)^4 - 2835*a^2*tan(f*x)^2*tan(e)^5 + 7560*a*b*tan(f*x)^2*tan(e)^5 - 3780*b^2*tan(f*x)^2*tan(e)^
5 - 252*a^2*tan(f*x)*tan(e)^6 + 1134*a*b*tan(f*x)*tan(e)^6 - 567*b^2*tan(f*x)*tan(e)^6 + 90*a*b*tan(e)^7 - 45*
b^2*tan(e)^7 - 11340*a^2*f*x*tan(f*x)^2*tan(e)^2 + 22680*a*b*f*x*tan(f*x)^2*tan(e)^2 - 11340*b^2*f*x*tan(f*x)^
2*tan(e)^2 + 63*a^2*tan(f*x)^5 - 126*a*b*tan(f*x)^5 + 63*b^2*tan(f*x)^5 + 945*a^2*tan(f*x)^4*tan(e) - 1890*a*b
*tan(f*x)^4*tan(e) + 945*b^2*tan(f*x)^4*tan(e) + 11340*a^2*tan(f*x)^3*tan(e)^2 - 22680*a*b*tan(f*x)^3*tan(e)^2
 + 11340*b^2*tan(f*x)^3*tan(e)^2 + 11340*a^2*tan(f*x)^2*tan(e)^3 - 22680*a*b*tan(f*x)^2*tan(e)^3 + 11340*b^2*t
an(f*x)^2*tan(e)^3 + 945*a^2*tan(f*x)*tan(e)^4 - 1890*a*b*tan(f*x)*tan(e)^4 + 945*b^2*tan(f*x)*tan(e)^4 + 63*a
^2*tan(e)^5 - 126*a*b*tan(e)^5 + 63*b^2*tan(e)^5 + 2835*a^2*f*x*tan(f*x)*tan(e) - 5670*a*b*f*x*tan(f*x)*tan(e)
 + 2835*b^2*f*x*tan(f*x)*tan(e) - 105*a^2*tan(f*x)^3 + 210*a*b*tan(f*x)^3 - 105*b^2*tan(f*x)^3 - 2835*a^2*tan(
f*x)^2*tan(e) + 5670*a*b*tan(f*x)^2*tan(e) - 2835*b^2*tan(f*x)^2*tan(e) - 2835*a^2*tan(f*x)*tan(e)^2 + 5670*a*
b*tan(f*x)*tan(e)^2 - 2835*b^2*tan(f*x)*tan(e)^2 - 105*a^2*tan(e)^3 + 210*a*b*tan(e)^3 - 105*b^2*tan(e)^3 - 31
5*a^2*f*x + 630*a*b*f*x - 315*b^2*f*x + 315*a^2*tan(f*x) - 630*a*b*tan(f*x) + 315*b^2*tan(f*x) + 315*a^2*tan(e
) - 630*a*b*tan(e) + 315*b^2*tan(e))/(f*tan(f*x)^9*tan(e)^9 - 9*f*tan(f*x)^8*tan(e)^8 + 36*f*tan(f*x)^7*tan(e)
^7 - 84*f*tan(f*x)^6*tan(e)^6 + 126*f*tan(f*x)^5*tan(e)^5 - 126*f*tan(f*x)^4*tan(e)^4 + 84*f*tan(f*x)^3*tan(e)
^3 - 36*f*tan(f*x)^2*tan(e)^2 + 9*f*tan(f*x)*tan(e) - f)